﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yammu.Core.MediaManagement;

namespace Yammu.Core.MediaManagement
{
    public class MediaCollection : MediaDir, IMediaCollection
    {
       

        #region Implementation of IMediaCollection

        public IMediaDir GetRootDir
        {
            get { return this; }
        }

        public IList<IMediaFile> GetByAttribute(string attrName, string attrValue)
        {
            throw new NotImplementedException();
        }

        public long Count
        {
            get { throw new NotImplementedException(); }
        }

      

        #endregion

        public override  Object InitializeLifetimeService()
        {
            return null;
        }

        #region Overrides of MediaItemBase

        public override bool IsDirectory
        {
            get { return true; }
        }

        public override void AddItem(IMediaItem mediaItem)
        {

            if (mediaItem.IsDirectory)
            {
                base.AddItem(mediaItem);
                return;
            }
            else
            {
                throw new InvalidOperationException("Can not add non directory items to MediaCollection");
            }
        }

        public void RemoveItem(IMediaItem file)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
